package com.innext.kjqb.ui.my.activity;

import android.content.Intent;
import android.view.View;
import android.widget.RadioButton;

import com.innext.kjqb.R;
import com.innext.kjqb.app.App;
import com.innext.kjqb.base.BaseActivity;
import com.innext.kjqb.base.tab.FragmentHostTabGroup;
import com.innext.kjqb.ui.main.WebViewActivity;
import com.innext.kjqb.ui.my.fragment.CouponOneFragment;
import com.innext.kjqb.ui.my.fragment.CouponThreeFragment;
import com.innext.kjqb.ui.my.fragment.CouponTwoFragment;

import butterknife.BindView;

/**
 * Created by gyl on 2017/5/4 0004.
 */

public class CouponActivity extends BaseActivity {
    @BindView(R.id.coupon_tabgroup)
    FragmentHostTabGroup mCoupon_tabgroup;
    @BindView(R.id.rb_unused)
    RadioButton mRbUnused;
    @BindView(R.id.rb_used)
    RadioButton mRbUsed;
    @BindView(R.id.rb_past)
    RadioButton mRbPast;

    @Override
    public int getLayoutId() {
        return R.layout.activity_coupon;
    }

    @Override
    public void initPresenter() {

    }

    @Override
    public void loadData() {
        mTitle.setTitle("我的优惠券");
        mTitle.setRightTitle("优惠券说明", new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(CouponActivity.this, WebViewActivity.class);
                intent.putExtra("url", App.getConfig().SOLVE_COUPON);
                startActivity(intent);
            }
        });
        mCoupon_tabgroup.setup(FragmentHostTabGroup.LOCATION_TOP);
        mCoupon_tabgroup.addTab(CouponOneFragment.class, null);
        mCoupon_tabgroup.addTab(CouponTwoFragment.class, null);
        mCoupon_tabgroup.addTab(CouponThreeFragment.class, null);
        mCoupon_tabgroup.setCurrentTab(0);

    }
}
